<init>
subevent(mapinit,);
#evflagsw(aks,==,0); if(nowres); 
#mc(6,enegr,=,); mc(7,enegr,=,); mc(8,enegr,=,);
#mc(6,enegr,=,(sO}[O,c@kE,iv,Kv,ivKv));
#mc(7,enegr,=,(iv,Kv,iv~R,Kv~R,ivKv));
#mc(8,enegr,=,(iv~R,Kv~R,ivKv,iv~PQ,Kv~PQ));
#endif;

evflagsw(ex_caslin,==,0); if(nowres); fc(c4,apr,=,0); endif;
evflagsw(ct_valaback,==,1); if(nowres); fc(c5,apr,=,1); endif;


#O
<out>
fade(out,(type=fade,color=000000,wait=16)); fc(*actor,move,36,-25,center); fc(*actor,dir,=,d); fc(*actor,float,=,0); changemap(tB[h); fade(in,(type=fade,color=000000,wait=16));


#{aQe
<to2>
#fade(fade,1,000000,255,16); fc(move,*actor,0,0,center); changemap(ip[{aQe); fade(in,(type=fade,color=000000,wait=16));
fade(out,(type=fade,color=000000,wait=16)); changemap(ip[{aQe); fade(in,(type=fade,color=000000,wait=16));


#{aSe
<to4>
evflagsw(pr_caslidou,==,0); if(nowres);
item(check:eq,caskey,1); if(nowres);
text(1,face=uam,w%it[*caskey].nmicxI);
else;
text(1,face=uam,ړû悤BŏKΎg悤ɂȂ肻B); end;
endif;
endif;
#label(1); fade(out,(type=fade,color=000000,wait=16)); changemap(ip[{aSe); fade(in,(type=fade,color=000000,wait=16));
label(1); fade(out,(type=voltex(3,0),color=000000,wait=32)); changemap(ip[{aSe); fade(in,(type=voltex(3,0),color=000000,wait=32));
#label(1); fade(voltex,1,000000,2,0,32); changemap(ip[{aSe); fade(voltex,2,000000,2,0,32);
#label(1); fade(voltex,1,000000,2,1,32); changemap(ip[{aSe); fade(voltex,2,000000,2,1,32);
#label(1); fade(voltex,1,000000,5,0,32); changemap(ip[{aSe); fade(voltex,2,000000,5,0,32);


#{an
<tob>
item(check:eq,caskey,1); if(nowres);
evflagsw(pr_honpen,==,0); if(nowres); text(1,face=uam,{҂NAĂKvL悤B);  end; endif;
evflagsw(ex_caslb,==,0); if(nowres); evflagsw(ex_caslb,=,1); text(1,face=uam,w%it[*caskey].nmicxI); endif;
sound(select);
#fade(out,(type=fade,color=000000,wait=16)); changemap(ip[{an); fade(in,(type=fade,color=000000,wait=16)); end;
fade(out,(type=blind(1,1),color=000000,wait=16)); fc(*actor,float,=,128); changemap(ip[{an); fade(in,(type=blind(1,1),color=000000,wait=16)); end;
else; sound(shield);
evflagsw(pr_honpen,==,0); if(nowres);
text(1,face=uam,|Ă邪ACɂKv͖B𓖂낤B);
else;
text(1,face=uam,|ĂB);
endif;
endif;


#{aReցiVj
<to2up>
fc(*actor,mvrgn,&,); if(nowres);
text(1,face=uam,󒆕VgI);
sound(warp); fade(out,(type=fade,color=000000,wait=16)); fc(*actor,float,=,-64); changemap(ip[{aQe); fade(in,(type=fade,color=000000,wait=16));
endif;


#{aPeAXCb`
<sw>
#sound(attack2); shake(1,4,4,2,2,8); fc(apr,c2,=,0); fc(apr,,=,0);
#sound(attack2); shake(1,4,4,2,2,8); fc(apr,:c3,=,0); fc(apr,,=,0);
#sound(attack2); shake(1,4,4,2,2,8); fc(*target:1,apr,=,0); fc(*target,apr,=,0);
#fc(*target,apr,=,0); fc(*target:1,setdown,down2,1); fc(*target:1,waitdown); fc(*target:1,apr,=,0);
fc(*target,apr,=,0); fc(*target:1,setdown,down2,1); fc(*target:1,mvpat,1,block_dapr,0); shake(1,4,4,2,2,8);


#{aPeA
<wl>
text(1,face=uam,ӂĂB̎d|𓮂ΊJB);


#ɒ
<box_enemy>
fc(*target,ans,=,16); wait(32); fc(*target,ans,=,0);
#fc(ani,,3,);
#fc(pic,,=,box-o);
text(0,Ȃƒg̓ip[I);
#fade(out,(type=btdefo,color=btdefo,dep=btdefo,rot=btdefo,wait=btdefo)); battle(sO}c@k,*def,, battle2,0,*def,def,*def,def, , 0,,); fade(in,);
fade(out,(type=btdefo,color=btdefo,dep=btdefo,rot=btdefo,wait=btdefo)); battle((enegr=sO}`ed}R,bgm=battle2:0,stm=0)); fade(in2,);
#item(check:eq,,1,20,); item(check:eq,򑐂Q,1,20,); item(check:eq,򑐂w,1,20,);

evflag(*selected,==,1); if(nowres);
item(check:eq,chyaku,1); or; item(check:eq,gchyaku,1); unif(nowres);
item(get,gchyaku,1); sound(warp); text(0,w%it[*gchyaku].nmicxɓꂽI);
endif; fc(*target,apr,=,0);
end; endif;

evflag(*selected,==,3); if(nowres);
#label(30);
fc(*target,ans,=,-16); wait(32); fc(*target,ans,=,0); subevent(escaped,);
end; endif;


#̌
<box_shisak>
#fc(*target,ani,=,4);
#item(get,̌,1); or; item(get,ž,1); or; item(get,̏,1); or; item(get,˂̏,1); if(nowres); text(0,w%it[*̌].nmicxw%it[*ž].nmicxw%it[*̏].nmicxw%it[*˂̏].nmicxɓꂽI); fc(*target,apr,=,0);
#else; text(0,w%it[*̌].nmicxw%it[*ž].nmicxw%it[*̏].nmicxw%it[*˂̏].nmicxȏ͎ĂȂB); fc(*target,ani,=,0); endif;

fc(*target,ani,=,4);
item(get,̌,1); if(nowres); sound(select); text(0,w%it[*̌].nmicxɓꂽI); fc(*target,apr,=,0); else; text(0,w%it[*̌].nmicxȏ͎ĂȂB); endif;
item(get,ž,1); if(nowres); sound(select); text(0,w%it[*ž].nmicxɓꂽI); fc(*target,apr,=,0); else; text(0,w%it[*ž].nmicxȏ͎ĂȂB); endif;
item(get,̏,1); if(nowres); sound(select); text(0,w%it[*̏].nmicxɓꂽI); fc(*target,apr,=,0); else; text(0,w%it[*̏].nmicxȏ͎ĂȂB); endif;
item(get,˂̏,1); if(nowres); sound(select); text(0,w%it[*˂̏].nmicxɓꂽI); fc(*target,apr,=,0); else; text(0,w%it[*˂̏].nmicxȏ͎ĂȂB); endif;
zukan(stat:*all,|=,(atrec,ptref));
fc(*target,apr,!=,0); if(nowres); fc(*target,ani,=,0); endif;


<kabegami>
evflagsw(ex_caslin,=,0); fc(*target,apr,=,0);
text(1,face=uam,{aɍŏɓ낤Ƃɕ\ꂽoIȂ̂ēx\悤ɂȂI);


<brd_valaback>
text(1,face=+evfch,ޗ̂͂ł͂ȂBRɂēׂB);


<recover>
evflagsw(ex_casrecv,==,0); if(nowres); evflagsw(ex_casrecv,=,1); text(1,face=uam,ł͉񕜂ł悤A悤B); endif;
select2(reset,all); select2(+񕜂@10000~(id=0)); select2(+߂Ă); select2(/); select2(*: %pty[e].gd(cid=));
evflag(*selected,==,0); if(nowres); party(,gold,>=,10000); if(nowres); party(,gold,+=,-10000); subevent(recover,); else; text(0,ȂI); endif; endif;